package top.wangjiu.java.jvm;

import top.wangjiu.java.jvm.constantinfo.ConstantPoolInfo;

/**
 * @ClassName InterfaceInfo
 * @Description TODO
 * @Author wangjiu
 * @Date 2022/1/14 4:07 下午
 */
public class InterfaceInfo {

    private final short index;

    private final short cpIndex;

    public InterfaceInfo(short index,short cpIndex){
        this.index = index;
        this.cpIndex = cpIndex;
    }

    public String toString(ConstantPoolInfo[] poolInfos){
        return poolInfos[cpIndex].toString(poolInfos).replace("/",".");
    }
}
